<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="${pageContext.servletContext.contextPath}/st/front/CSS/base.css">
    <link rel="stylesheet" href="${pageContext.servletContext.contextPath}/st/front/CSS/index.css">
    <script src="${pageContext.servletContext.contextPath}/st/front/JS/jquery.min.js"></script>
    <script src="${pageContext.servletContext.contextPath}/st/front/JS/index.js"></script>
    <link rel="stylesheet" href="${pageContext.servletContext.contextPath}/st/front/font/demo.css">
    <link rel="stylesheet" href="${pageContext.servletContext.contextPath}/st/front/font/iconfont.css">
    <title>小米商城</title>
    <link rel="shortcut icon"
          href="${pageContext.servletContext.contextPath}/images/logo.jpg"/>
</head>
<body>
<!--头部公共代码-->
<jsp:include page="/Front_Head"></jsp:include>
<!--轮播图-->
<div class="banner">
    <div class="xm_banner">
        <!--轮播图-->
        <ul class="bannerBox">
            <c:forEach items="${advertisements}" var="advert">
                <c:if test="${advert.type_id==1}">
                    <li>
                        <a href="${pageContext.servletContext.contextPath}/FindCid/${advert.cid}">
                            <img src="${pageContext.servletContext.contextPath}/images/${advert.apath}" class="bannerBoxImg" alt="">
                        </a>
                    </li>
                </c:if>
            </c:forEach>
        </ul>
        <!--侧边栏盒子  -->
        <div class="sidebarBox">
            <c:forEach var="mill" items="${malltypes}">
                <div class="sidebarBoxDiv">
                    <c:forEach var="list" items="${mill.commoditys}" varStatus="sta">
                        <c:if test="${sta.count==1}">
                            <div class="sidebar-col">
                        </c:if>
                        <c:if test="${sta.count%6==0}">
                            <a href="${pageContext.servletContext.contextPath}/FindCid/${list.cid}">
                                <img src="${pageContext.servletContext.contextPath}/images/${list.picturepath}" alt="">
                                <span>${list.comname}</span>
                            </a>
                            </div>
                            <div class="sidebar-col">
                        </c:if>
                        <c:if test="${sta.count%6!=0}">
                            <a href="${pageContext.servletContext.contextPath}/FindCid/${list.cid}">
                                <img src="${pageContext.servletContext.contextPath}/images/${list.picturepath}" alt="">
                                <span>${list.comname}</span>
                            </a>
                        </c:if>
                        <c:if test="${sta.count==mill.commoditys.size()}">
                            </div>
                        </c:if>
                    </c:forEach>
                </div>
            </c:forEach>
        </div>
        <!--侧边栏-->
        <div class="sidebar">
            <ul class="sidebarUL">
                <c:forEach items="${malltypes}" var="mall">
                    <li>
                        <a href="${pageContext.servletContext.contextPath}/FindClass/${mall.pbid}">
                            <span>${mall.pbname}</span>
                            <span class="iconfont">></span>
                        </a>
                    </li>
                </c:forEach>
            </ul>
        </div>
        <!--点-->
        <ul class="bannerDot">
          <li class="active">
            <a href="javascript:;"></a>
          </li>
          <li>
            <a href="javascript:;"></a>
          </li>
          <li>
            <a href="javascript:;"></a>
          </li>
          <li>
            <a href="javascript:;"></a>
          </li>
          <li>
            <a href="javascript:;"></a>
          </li>
          <li>
            <a href="javascript:;"></a>
          </li>
        </ul>
        <!--左箭头-->
        <div class="bannerLeft bannerDirection">
            <a href="javascript:;">
                <span class="iconfont">《</span>
            </a>
        </div>
        <!--右箭头-->
        <div class="bannerRight bannerDirection">
            <a href="javascript:;">
                <span class="iconfont">》</span>
            </a>
        </div>
    </div>

</div>
<!--轮播图底部-->
<div class="bannerBottom">
    <div class="bBMain">
        <div class="bBMainL">
            <ul>
                <li>
                    <a href="javascript:;">
                        <span class="iconfont">&#xe725;</span>
                        <span>小米秒杀</span>
                    </a>
                </li>
                <li>
                    <a href="javascript:;">
                        <span class="iconfont">&#xe646;</span>
                        <span>企业团购</span>
                    </a>
                </li>
                <li>
                    <a href="javascript:;">
                        <span class="iconfont">&#xe61f;</span>
                        <span>F码通道</span>
                    </a>
                </li>
                <li>
                    <a href="javascript:;">
                        <span class="iconfont">&#xe946;</span>
                        <span>米粉卡</span>
                    </a>
                </li>
                <li>
                    <a href="javascript:;">
                        <span class="iconfont">&#xe944;</span>
                        <span>以旧换新</span>
                    </a>
                </li>
                <li>
                    <a href="javascript:;">
                        <span class="iconfont">&#xe633;</span>
                        <span>话费充值</span>
                    </a>
                </li>
            </ul>
        </div>
        <!--轮播图下面3个广告图-->
        <c:forEach var="adver" items="${advertisements}">
            <c:if test="${adver.type_id==2}">
                <div class="bBMainR">
                    <a href="${pageContext.servletContext.contextPath}/FindCid/${adver.cid}">
                        <img src="${pageContext.servletContext.contextPath}/images/${adver.apath}" alt="">
                    </a>
                </div>
            </c:if>
        </c:forEach>
    </div>
</div>
<!--手机模块-->
<div class="mobileP">
    <h2>手机</h2>
    <div class="mobilePMain">
        <div class="mobilePML">
            <a href="${pageContext.servletContext.contextPath}/FindCid/${FirstGrade4.cid}">
                <img src="${pageContext.servletContext.contextPath}/images/${FirstGrade4.apath}" alt="">
            </a>
        </div>
        <!--手机模块显示-->
        <div class="mobilePMR">
            <ul class="mobileRUl">
                <c:forEach items="${phoneList}" var="phone">
                    <li>
                        <a href="${pageContext.servletContext.contextPath}/FindCid/${phone.cid}">
                            <div class="mobileRImg">
                                <img src="${pageContext.servletContext.contextPath}/images/${phone.picturepath}" alt="">
                            </div>
                            <h3>${phone.comname}</h3>
                            <p>${phone.describe}</p>
                            <p>
                                <span>${phone.minpraice}起</span>
                            </p>
                        </a>
                    </li>
                </c:forEach>
            </ul>
        </div>
    </div>
    <!--模块上广告-->
    <div class="mobilePB">
        <a href="${pageContext.servletContext.contextPath}/FindCid/${Secondadver.cid}">
            <img src="${pageContext.servletContext.contextPath}/images/${Secondadver.apath}" style="width: 100%;height: 100%">
        </a>
    </div>
    <div class="mobileSearh">
        <a href="${pageContext.servletContext.contextPath}/FindClass/1">
            <span>查看全部</span>&nbsp;
            <span class="iconfont">&#xe62f;</span>
        </a>
    </div>
</div>
<!--家电模块-->
<div class="productCommon">
    <h2>家电</h2>
    <div class="productCommonM">
        <div class="productCommonML">
            <ul class="CommonMLUl">
                <li>
                    <a href="${pageContext.servletContext.contextPath}/FindCid/${SecondGrade4.cid}">
                        <img src="${pageContext.servletContext.contextPath}/images/${SecondGrade4.apath}" alt="">
                    </a>
                </li>
                <li>
                    <a href="${pageContext.servletContext.contextPath}/FindCid/${thirdGrade4.cid}">
                        <img src="${pageContext.servletContext.contextPath}/images/${thirdGrade4.apath}" alt="">
                    </a>
                </li>
            </ul>
        </div>
        <div class="productCommonMR">
            <ul class="CommonMRUl">
                <c:forEach var="houseList" items="${houseList}" varStatus="houseSta">
                    <c:if test="${houseSta.count!=8}">
                        <li>
                            <a href="${pageContext.servletContext.contextPath}/FindCid/${houseList.cid}">
                                <div class="CommonMRImg">
                                    <img src="${pageContext.servletContext.contextPath}/images/${houseList.picturepath}" alt="">
                                </div>
                                <h3>${houseList.comname}</h3>
                                <p>${houseList.describe}</p>
                                <p>
                                    <span>${houseList.minpraice}元起</span>
                                </p>
                            </a>
                        </li>
                    </c:if>
                    <c:if test="${houseSta.count==8}">
                        <li>
                            <a href="${pageContext.servletContext.contextPath}/FindCid/${houseList.cid}">
                                <div class="CommonRLast">
                                    <p>${houseList.comname}</p>
                                    <p>
                                        <span>${houseList.minpraice}元</span>
                                    </p>
                                </div>
                                <div class="CommonMRImg">
                                    <img src="${pageContext.servletContext.contextPath}/images/${houseList.picturepath}" alt="">
                                </div>
                            </a>
                            <a href="${pageContext.servletContext.contextPath}/FindClass/4">
                                <div class="CommonRLast">
                                    <p>浏览更多</p>
                                    <p>
                                        <span>查看</span>
                                    </p>
                                </div>
                                <div class="CommonMRImg">
                                    <img src="${pageContext.servletContext.contextPath}/images/2556627637.png">
                                </div>
                            </a>
                        </li>
                    </c:if>
                </c:forEach>
            </ul>
        </div>
    </div>
    <div class="CommonPB">
        <a href="${pageContext.servletContext.contextPath}/FindCid/${Thirdadver.cid}">
            <img src="${pageContext.servletContext.contextPath}/images/${Thirdadver.apath}" style="width: 100%;height: 100%">
        </a>
    </div>
    <!--模块右上角显示-->
    <div class="CommonSearch">
    </div>
</div>
<!--耳机音箱模块-->
<div class="productCommon">
    <h2>耳机音箱</h2>
    <div class="productCommonM">
        <div class="productCommonML">
            <ul class="CommonMLUl">
                <li>
                    <a href="${pageContext.servletContext.contextPath}/FindCid/${fourthGrade4.cid}">
                        <img src="${pageContext.servletContext.contextPath}/images/${fourthGrade4.apath}" alt="">
                    </a>
                </li>
                <li>
                    <a href="${pageContext.servletContext.contextPath}/FindCid/${fifthGrade4.cid}">
                        <img src="${pageContext.servletContext.contextPath}/images/${fifthGrade4.apath}" alt="">
                    </a>
                </li>
            </ul>
        </div>
        <div class="productCommonMR">
            <ul class="CommonMRUl">
                <c:forEach var="aiList" items="${AiList}" varStatus="aiSta">
                    <c:if test="${aiSta.count!=8}">
                        <li>
                            <a href="${pageContext.servletContext.contextPath}/FindCid/${aiList.cid}">
                                <div class="CommonMRImg">
                                    <img src="${pageContext.servletContext.contextPath}/images/${aiList.picturepath}" alt="">
                                </div>
                                <h3>${aiList.comname}</h3>
                                <p>${aiList.describe}</p>
                                <p>
                                    <span>${aiList.minpraice}元起</span>
                                </p>
                            </a>
                        </li>
                    </c:if>
                    <c:if test="${aiSta.count==8}">
                        <li>
                            <a href="${pageContext.servletContext.contextPath}/FindCid/${aiList.cid}">
                                <div class="CommonRLast">
                                    <p>${aiList.comname}</p>
                                    <p>
                                        <span>${aiList.minpraice}元</span>
                                    </p>
                                </div>
                                <div class="CommonMRImg">
                                    <img src="${pageContext.servletContext.contextPath}/images/${aiList.picturepath}" alt="">
                                </div>
                            </a>
                            <a href="${pageContext.servletContext.contextPath}/FindClass/6">
                                <div class="CommonRLast">
                                    <p>浏览更多</p>
                                    <p>
                                        <span>查看</span>
                                    </p>
                                </div>
                                <div class="CommonMRImg">
                                    <img src="${pageContext.servletContext.contextPath}/images/2556627637.png">
                                </div>
                            </a>
                        </li>
                    </c:if>
                </c:forEach>
            </ul>
        </div>
    </div>
    <!--模块右上角显示-->
    <div class="CommonSearch">
    </div>
</div>
<!--尾部公共代码-->
<jsp:include page="tail.jsp"></jsp:include>
</body>
</html>